package frame.base;

import java.util.ArrayList;
import java.util.List;

/**
 * @author PeiWentao
 * BootstrapTable 数据结构
 */
public class BootstrapTable <T>{
    /** 总数*/
    private long total;
    /** 当前页数据*/
    private List<T> rows;

    public BootstrapTable() {
    }

    public BootstrapTable(long total, List<T> rows) {
        this.total = total;
        this.rows = rows;
    }

    public long getTotal() {
        return total;
    }

    public void setTotal(int total) {
        this.total = total;
    }

    public List<T> getRows() {
        if (rows == null) {
            return new ArrayList<>();
        } else {
            return rows;
        }
    }

    public void setRows(List<T> rows) {
        this.rows = rows;
    }
}
